package com.cmc.cloud.cmclink.doc.api.document.req.si;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * 提单打印编辑入参
 *
 * @author llp
 */
@Schema(description = "打印编辑入参")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PrintEditDto {

    @Schema(description = "previewBl、draftBl、printAtt、printNoBl", example = "对应打印编辑中4个按钮，点击按钮必传")
    private String type;

    @Schema(description = "是否为批量生成按钮", example = "false")
    @NotNull(message = "isBatch is required")
    private Boolean isBatch;

    @Schema(description = "提单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9807")
    private Long blnoId;

    @Schema(description = "提单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @Length(max = 50, message = "{blnoblprintlog.blno.length}")
    private String blno;

    @Schema(description = "打印内容json-预览整体页面的内容json", requiredMode = Schema.RequiredMode.REQUIRED)
    private String printJson;

    @Schema(description = "打印类型SIGN TYPE 、Copy件、海运单、正本 ", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @Length(max = 20, message = "{blnoblprintlog.printtype.length}")
    private String printType;

    @Schema(description = "打印主体 海外HW  海南HN   ")
    @Length(max = 20, message = "{blnoblprintlog.printblentity.length}")
    private String printBlEntity;

    @Schema(description = "打印份数 三个选项：0、1、2、3", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer printNumber;

    @Schema(description = "打印港口", requiredMode = Schema.RequiredMode.REQUIRED)
    @Length(max = 5, message = "{blnoblprintlog.printport.length}")
    private String printPort;

    @Schema(description = "打印船名")
    @Length(max = 20, message = "{blnoblprintlog.printvessel.length}")
    private String printVessel;

    @Schema(description = "打印航次")
    @Length(max = 20, message = "{blnoblprintlog.printvoyage.length}")
    private String printVoyage;

    @Schema(description = "操作类型 两个选项：preview、printed", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @Length(max = 20, message = "{blnoblprintlog.operationtype.length}")
    private String operationType;

    @Schema(description = "备注", example = "你猜")
    @Length(max = 255, message = "{blnoblprintlog.remark.length}")
    private String remark;
}
